package oop.java0328.work1;

public class NetTeacher extends Teacher {
    private String major;

    public NetTeacher(String major) {
        this.major = major;
    }

    public NetTeacher(String name, int age, int workYear, String gender, String major) {
        super(name, age, workYear, gender);
        this.major = major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getMajor() {
        return major;
    }

    public void teach() {
        System.out.println("教授" + major);
    }

    @Override
    public void giveLession() {
        System.out.println("使用Visual studio上课");
    }


}
